
all: nasm
	bximage -q -hd=16 -func=create -sectsize=512 -imgmode=flat build/hd.img #创建空镜像
	dd if=build/MBR.o of=build/hd.img bs=512 conv=notrunc #底层字节级数据操作
	dd if=build/loader.o of=build/hd.img bs=512 seek=1 count=3 conv=notrunc #底层字节级数据操作

nasm:
	mkdir build
	nasm -f bin MBR.asm -o build/MBR.o
	nasm -f bin loader.asm -o build/loader.o

clean:
	rm -r build

bochs: all
	bochs -q -f bochsrc